<template>
    <div class="index">
      <h1>恭喜支付成功</h1>
      <mt-btn type="primary" @click.native="goGoods">查看商品</mt-btn>
    </div>
</template>
<script type="text/javascript" charset="UTF-8" src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
<script lang="js">
  import Header from '@/common/_header.vue'
  import { Button } from 'mint-ui';
  export default {
    components: {
        'v-header': Header,
        'mt-btn': Button
      },
    methods: {
      goGoods () {
        let mchData ={action:'jumpOut', jumpOutUrl:'https://kc.honghuayujia.top'}
        let postData = JSON. stringify(mchData)
        parent.postMessage(postData,'https://payapp.weixin.qq.com')
      }
    },
    created() {
      let mchData ={action:'onIframeReady',displayStyle:'SHOW_CUSTOM_PAGE'}
      let postData = JSON. stringify(mchData)
      parent.postMessage(postData,'https://payapp.weixin.qq.com')
    },
  }

</script>
<style lang="less" scoped>
  .index {
    text-align: center;
    h1 {
      font-size: 8vw;
      font-weight: 900;
      margin-bottom: 20px;
      margin-top: 50px;
    }
  }
</style>
